package com.sc.nft.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.sc.nft.entity.CollectionChainInitDetailsLog;
import com.sc.nft.entity.vo.TmpCollectionVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * 藏品初始化上链记录详情表(sc_collection_chain_init_details_log)数据Mapper
 *
 * @author Sun
 * @since 2023-04-18 14:28:42
 * @description 由 Mybatisplus Code Generator 创建
 */
@Mapper
public interface CollectionChainInitDetailsLogMapper extends BaseMapper<CollectionChainInitDetailsLog> {

    /**
     * 获取待上链藏品id
     * @param status
     * @param dealStatus
     * @return
     */
    Long getOneTypeIds(@Param("status") int status,@Param("dealStatus") int dealStatus);

    void insetBatch(@Param("list") List<CollectionChainInitDetailsLog> list);

    @Select(" select * from tmp_collection where id not in (select numbering from tmp_collection where numbering is not null) ")
    List<TmpCollectionVO> getTmpData();

    List<CollectionChainInitDetailsLog> getExcludeListByCollectionId(@Param("collectionId") Long collectionId, @Param("list") List<Integer> list, @Param("limit") Integer limit);
}
